package com.ayit.car.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 车辆内饰颜色关联表
 * @TableName vehicle_interior_colors
 */
@TableName(value ="vehicle_interior_colors")
public class VehicleInteriorColors implements Serializable {
    /**
     * 颜色ID，主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 车辆ID
     */
    private Long vehicleId;

    /**
     * 内饰颜色ID
     */
    private Long colorId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 颜色ID，主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 颜色ID，主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 车辆ID
     */
    public Long getVehicleId() {
        return vehicleId;
    }

    /**
     * 车辆ID
     */
    public void setVehicleId(Long vehicleId) {
        this.vehicleId = vehicleId;
    }

    /**
     * 内饰颜色ID
     */
    public Long getColorId() {
        return colorId;
    }

    /**
     * 内饰颜色ID
     */
    public void setColorId(Long colorId) {
        this.colorId = colorId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        VehicleInteriorColors other = (VehicleInteriorColors) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getVehicleId() == null ? other.getVehicleId() == null : this.getVehicleId().equals(other.getVehicleId()))
            && (this.getColorId() == null ? other.getColorId() == null : this.getColorId().equals(other.getColorId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getVehicleId() == null) ? 0 : getVehicleId().hashCode());
        result = prime * result + ((getColorId() == null) ? 0 : getColorId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", vehicleId=").append(vehicleId);
        sb.append(", colorId=").append(colorId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}